package com.gisuni.sddc.platformManager.model;

import java.util.Date;
import java.util.List;

import org.apache.http.conn.routing.RouteInfo;
import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.ManyMany;
import org.nutz.dao.entity.annotation.Name;
import org.nutz.dao.entity.annotation.Table;
 

 
@Table(value = "ROLE_INFO" )
public class RoleInfo implements java.io.Serializable {

	// Fields
	@Name
	@Column(value = "ROLE_ID")
	private String roleId;
	
	@Column(value = "ROLE_PARENT_ID")
	private String roleParentId;
	
	@Column(value = "ROLE_NAME")
	private String roleName;
	
	@Column(value = "DISPLAYNAME" )
	private String displayname;
	
	@Column(value = "DESCRIPTION" )
	private String description;
	
	@Column(value = "ROLE_TYPE" )
	private String roleType;
	
	@Column(value = "CREATE_TIME" )
	private Date createTime;
	
	@Column(value = "UPDATE_TIME" )
	private Date updateTime;
	
	@Column(value = "STATUS" )
	private String status;

	@Column(value ="ROLE_AREA")
	private String roleArea ; //角色可视区域  eg : 白云区,天河区,
	
	@Column(value = "ROLE_AREA_TYPE")
	private String roleAreaType;//角色可视区域类型   city/distinct
	
	
	@ManyMany(target = ResourceInfo.class, relation = "SDDCGISPLATFORM.ROLE_R_RESOURCE",from="ROLE_ID",to="RESOURCE_ID")
	private List<ResourceInfo> resourceInfos;
	
	// Constructors

	public List<ResourceInfo> getResourceInfos() {
		return resourceInfos;
	}

	public void setResourceInfos(List<ResourceInfo> resourceInfos) {
		this.resourceInfos = resourceInfos;
	}

	/** default constructor */
	public RoleInfo() {
	}

	/** minimal constructor */
	public RoleInfo(String roleId) {
		this.roleId = roleId;
	}

	/** full constructor */
	public RoleInfo(String roleId, String roleParentId, String roleName,
			String displayname, String description, String roleType,
			Date createTime, Date updateTime, String status) {
		this.roleId = roleId;
		this.roleParentId = roleParentId;
		this.roleName = roleName;
		this.displayname = displayname;
		this.description = description;
		this.roleType = roleType;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.status = status;
	}

	// Property accessors
	
//	@Id

	public String getRoleId() {
		return this.roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}


	public String getRoleParentId() {
		return this.roleParentId;
	}

	public void setRoleParentId(String roleParentId) {
		this.roleParentId = roleParentId;
	}

	
	public String getRoleName() {
		return this.roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	
	public String getDisplayname() {
		return this.displayname;
	}

	public void setDisplayname(String displayname) {
		this.displayname = displayname;
	}

	
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	
	public String getRoleType() {
		return this.roleType;
	}

	public void setRoleType(String roleType) {
		this.roleType = roleType;
	}

	
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getRoleArea() {
		return roleArea;
	}

	public void setRoleArea(String roleArea) {
		this.roleArea = roleArea;
	}

	public String getRoleAreaType() {
		return roleAreaType;
	}

	public void setRoleAreaType(String roleAreaType) {
		this.roleAreaType = roleAreaType;
	}
}